# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=cheat-sh
pkgver=6
pkgrel=8
pkgdesc='The only cheat sheet you need.'
arch=('any')
groups=('blackarch' 'blackarch-automation' 'blackarch-misc')
url='https://cheat.sh'
license=('MIT')
depends=('python' 'python-virtualenv' 'git')
optdepends=('curl: use the cheat sheet server for lite mode.'
            'xsel: for copying.'
            'rlwrap: to use cht.sh in the shell mode.'
            )
source=("cheat-$pkgver.sh::https://cht.sh/:cht.sh"
        "cheat-completion-$pkgver.sh::https://cht.sh/:bash_completion"
        )
sha512sums=('30c9f28f5382c5cf60a0a10b25edfb2821d043af7acbd67cfa747cdf3b0a820f98a0cd174f1c47868e831874a50f8ddf69298d527f963c88351ab66186e13c28'
            'ed21913d004f9460a5cefb17cc805c4e9349aaf7d77e869b0a28fba492e3fe5e297d18937dc3d9476445b530235a56aeadc84a5252f6fb54673e4e018d80f300')

package() {
  install -Dm 755 "cheat-$pkgver.sh"  "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "cheat-completion-$pkgver.sh" \
    "$pkgdir/usr/share/bash-completion/completions/$pkgname"
}

